package stage1.module2;


public class Homework3Card {
    private Homework3CardEnum type;
    private String id;
    private String name;
    private String password;
    private double balance = 0;
    private double talkTime;
    private double data;

    public Homework3Card(Homework3CardEnum type, String id,  String name, String password){
        this.type = type;
        this.id = id;
        this.name = name;
        this.password = password;
    }

    public void show(){
        System.out.printf("卡号：%s,用户名：%s,余额：%.2f", id, name, balance);
        System.out.println();
    }

    public Homework3CardEnum getType() {
        return type;
    }

    public void setType(Homework3CardEnum type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getBalance() {
        return balance;
    }

    public void topUp(double money) {
        this.balance += money;
    }

    public double getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(double talkTime) {
        this.talkTime = talkTime;
    }

    public double getData() {
        return data;
    }

    public void setData(double data) {
        this.data = data;
    }


}
